package com.chapter10.homework_.homework06;

import java.util.Scanner;

/**
 * @author 宋鑫宇
 * @version 1.0
 */
public class Car {
    private double temperature;
    class Air {
        public void flow() {
            if (temperature > 40) {
                System.out.println("开启冷气...");
                return;
            }
            if (temperature < 0){
                System.out.println("开启暖气...");
                return;
            }
            System.out.println("关闭空调...");
        }
    }
    public void Sc(){
        Scanner scanner = new Scanner(System.in);
        Air air = new Air();
        System.out.println("请输入今天的温度");
        temperature = scanner.nextDouble();
        air.flow();

    }
}
